home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c,comp.lang.c++
- Path: newsfeed.tip.net!pm1!news
- From: Daniel Marell <Daniel.Marell@Contactor.se>
- Subject: Re: HELP! On how to declare large arrays.
- X-Nntp-Posting-Host: foxton
- Content-Type: text/plain; charset=us-ascii
- Message-ID: <3149EB16.1943@Contactor.se>
- Sender: news@contactor.se (Net News)
- Content-Transfer-Encoding: 7bit
- Organization: Objekt-Makarna AB
- References: <lynch-1303962017180001@mac50.sask.trlabs.ca>
- Mime-Version: 1.0
- Date: Fri, 15 Mar 1996 22:11:34 GMT
- X-Mailer: Mozilla 2.0 (WinNT; I)
-
- Throw out you old DOS and Windows 3.11. Switch to Windows NT or Linux and say
- forever goodbye to 16-bit and segmentation. Or at least switch to the
- temporary surrogate Windows 95. If you insist to keep your old DOS, try a DOS
- extender. I've tried Pharlap TNT. It can run native Win32-console applications
- on a tiny DOS-PC.
-
- While you are waiting for your new Windows NT-installation to finish, try this:
-
- #include <complex.h>
-
- void
- main()
- {
- complex* complexArray[512]; // Array of 512 pointers to complex
- int a, b;
-
- // Let each element in the 512-array point to an array of 128 elements each
- for (a = 0; a < 512; a++)
- complexArray[a] = new complex[128];
-
- // Initialize it
- for (a = 0; a < 512; a++)
- {
- for (b = 0; b < 128; b++)
- complexArray[a][b] = 0;
- }
-
- // ...
- }
-
- I hope this is what you are looking for.
-